package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ResDishMapper;
import com.ruoyi.system.domain.ResDish;
import com.ruoyi.system.service.IResDishService;

/**
 * 餐馆菜品Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-02
 */
@Service
public class ResDishServiceImpl implements IResDishService 
{
    @Autowired
    private ResDishMapper resDishMapper;

    /**
     * 查询餐馆菜品
     * 
     * @param dishId 餐馆菜品主键
     * @return 餐馆菜品
     */
    @Override
    public ResDish selectResDishByDishId(Long dishId)
    {
        return resDishMapper.selectResDishByDishId(dishId);
    }

    /**
     * 查询餐馆菜品列表
     * 
     * @param resDish 餐馆菜品
     * @return 餐馆菜品
     */
    @Override
    public List<ResDish> selectResDishList(ResDish resDish)
    {
        return resDishMapper.selectResDishList(resDish);
    }

    /**
     * 新增餐馆菜品
     * 
     * @param resDish 餐馆菜品
     * @return 结果
     */
    @Override
    public int insertResDish(ResDish resDish)
    {
        return resDishMapper.insertResDish(resDish);
    }

    /**
     * 修改餐馆菜品
     * 
     * @param resDish 餐馆菜品
     * @return 结果
     */
    @Override
    public int updateResDish(ResDish resDish)
    {
        return resDishMapper.updateResDish(resDish);
    }

    /**
     * 批量删除餐馆菜品
     * 
     * @param dishIds 需要删除的餐馆菜品主键
     * @return 结果
     */
    @Override
    public int deleteResDishByDishIds(Long[] dishIds)
    {
        return resDishMapper.deleteResDishByDishIds(dishIds);
    }

    /**
     * 删除餐馆菜品信息
     * 
     * @param dishId 餐馆菜品主键
     * @return 结果
     */
    @Override
    public int deleteResDishByDishId(Long dishId)
    {
        return resDishMapper.deleteResDishByDishId(dishId);
    }
}
